import request from '@/utils/request'

// 查询司机信息列表
export function listDriver(query) {
  return request({
    url: '/tms/driver/list',
    method: 'get',
    params: query
  })
}
// 客户端上传成功绑定关系
export function fileBang(data){
  return request ({
    url:'/file/bind',
    method:'post',
    data:data
  })
}
// 查询司机信息详细
export function getDriver(id) {
  console.log(id);
  return request({
    url: '/tms/driver/' + id,
    method: 'get'
  })
}

// 新增司机信息
export function addDriver(data) {
  return request({
    url: '/tms/driver',
    method: 'post',
    data: data
  })
}
// 获取车辆信息和车牌号
export function getCar(data) {
  return request({
    url:'/tms/car/list/idAndCarNumber',
    method:'get',
    data:data
  })
}
// 修改司机信息
export function updateDriver(data) {
  return request({
    url: '/tms/driver',
    method: 'put',
    data: data
  })
}

// 删除司机信息
export function delDriver(id) {
  return request({
    url: '/tms/driver/' + id,
    method: 'delete'
  })
}
